package analysis;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;

public class SplitLog {

	/**
	 * @param args
	 * @throws IOException 
	 * @throws ParseException 
	 */
	public static void main(String[] args) throws IOException, ParseException {
		String[] fileNames={"timeTest.log.2-13-11-15-23","timeTest.log.2-13-11-16-00","timeTest.log.2-13-11-16-01","timeTest.log.2-13-11-16-02"};
		String rateFile="logs/192.168.3.13";
		BufferedReader reader=new BufferedReader(new FileReader(rateFile));
		String line=reader.readLine();
		String[] lineArray=line.split("\t");
		String timeString=lineArray[1].substring(0,lineArray[1].length()-1);
		double size=Double.valueOf(lineArray[8]);
		SimpleDateFormat format=new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy",Locale.US);
		System.out.println(format.parse(timeString));
		System.out.println(new Date("Fri Nov 16 10:23:20 CST 2013").getTime());
		System.out.println(System.currentTimeMillis());
		reader.close();
		
	}

}
